$primary-color: #334455;

@font-face {
  font-family: "iconfont";
  src: url("./iconfont/iconfont.eot");
  src: url("./iconfont/iconfont.eot?#iefix") format("embedded-opentype"),
    url("./iconfont/iconfont.woff2") format("woff2"),
    url("./iconfont/iconfont.woff") format("woff"),
    url("./iconfont/iconfont.ttf") format("truetype"),
    url("./iconfont/iconfont.svg#iconfont") format("svg");
}

@font-face {
  font-family: "Oswald";
  src: url("./iconfont/Oswald-Regular.ttf") format("truetype");
}

.app {
  user-select: none;
  cursor: default;
  height: 100%;
  box-sizing: border-box;

  .window {
    display: flex;
    flex-direction: column;
    height: 100%;

    .app-command-bar {
      user-select: none;
      height: 2.5em;
      box-sizing: border-box;
      display: flex;
      -webkit-app-region: drag;
      padding: 0 1rem;
      background-image: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
      > .title-bar {
        flex: 1;
        display: flex;
        align-items: center;
      }
      > .system-commands {
        justify-content: flex-end;
        display: flex;
        -webkit-app-region: no-drag;

        > div {
          height: 2.5rem;
          width: 3.25rem;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: background-color ease 150ms;

          > span {
            font-family: "iconfont" !important;
            font-size: 8px;
            font-style: normal;
            font-weight: 100;
          }

          &:hover {
            background-color: darken($primary-color, 0.95);
            color: #fff;
            &:active {
              background-color: darken($primary-color, 0.8);
            }
          }

          &.close-btn:hover {
            background-color: #e81123;
            &:active {
              background-color: #dd5d67;
            }
          }
        }
      }
    }

    .app-page-view {
      flex: 1;
      position: relative;

      > .view {
        position: absolute;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        &-enter {
          opacity: 0;
        }
        &-enter-active {
          opacity: 0;
          transition: opacity ease-in-out 300ms;
        }
        &-enter-done {
          opacity: 1;
        }

        &-exit {
          opacity: 1;
        }
        &-exit-active {
          transition: opacity ease-out 300ms;

          opacity: 0;
        }
        &-exit-done {
          opacity: 0;
        }
      }
    }
  }
}
